﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace Strongshell.Recoil.Core.Composition.Parsing.DependencyInjection
{
    public class ListDependencyInjector : NestingDependencyInjectorBase
    {
        private readonly IList target;

        public ListDependencyInjector(IObjectConfigurationRegistry objectConfigurationRegistry, ObjectConfiguration currentConfiguration, Type expectedType, IList target)
            : base(objectConfigurationRegistry, currentConfiguration, expectedType)
        {
            this.target = target;
        }

        public override void Inject(object value)
        {
            target.Add(value);
        }
    }
}